/**
 * blog模块接口列表
 */
import axios from '@/utils/http';//导入http中创建的axios实例

const blog = {
    login(params) {
        return axios.post(`api/Blog`, params)
    },
    getBlogTypeList(){
        return axios.get(`BlogTypes/Index`)
    },
    getBlogList(typeId){
        return axios.get(`Blogs/Index?typeId=`+typeId)
    },
    writeBlog(params)
    {
        return axios.post(`Blogs/Create`,params)
    },
    getDiscuss(Id){
        return axios.get(`Comments/Index?id=`+Id)
    },
    writeDiscuss(params){
        return axios.post(`Comments/Create`,params)
    },
    getHostList(){
        return axios.get(`Blogs/HostList`)
    }
}

export default blog;
